﻿@model IEnumerable<InformationCenter.Models.ArticleList>

@{
    ViewBag.Title = "Index";
}

<section id="container" class="">
      <!--header start-->
      <!--header end-->
      <!--sidebar end-->
      <!--main content start-->
          <section class="wrapper site-min-height">
              <!-- page start-->
              <div class="row">
                <div class="col-sm-12">
              <section class="panel">
              <header class="panel-heading">
                  文章管理
             <span class="tools pull-right">
                <a href="javascript:;" class="fa fa-chevron-down"></a>
                <a href="javascript:;" class="fa fa-times"></a>
             </span>
              </header>
              <div class="panel-body">
                  <div class="adv-table">
                      <div class="clearfix">
                          <div class="btn-group">
                              @Html.ActionLink("Create New", "Create", "", new {@class = "btn btn-danger"})
                          </div>
                      </div>
@using (Html.BeginForm("Index", "ArticleLists", FormMethod.Post))
{
    <table class="display table table-bordered table-striped" id="dynamic-table">
        <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Category)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Writer)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.CreateDateTime)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ReadCount)
            </th>
            <th></th>
        </tr>
        </thead>
        <tbody>
        @foreach (var item in Model)
        {
            <tr class="gradeA">
                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>
                <td>
                    @Html.ActionLink(@item.Category, "Index", new { @item.Category})
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Writer)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.CreateDateTime)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.ReadCount)
                </td>
                <td style="width: 200px">
                    @Html.ActionLink("Edit", "Edit", new {id = item.Id}, new {@class = "btn btn-primary btn-xs"}) |
                    @Html.ActionLink("Details", "Details", new {id = item.Id}, new {@class = "btn btn-success btn-xs"}) |
                    @Html.ActionLink("Delete", "Delete", new {id = item.Id}, new {@class = "btn btn-danger btn-xs"})
                </td>
            </tr>
        }
        </tbody>
    </table>
}
                  </div>
              </div>
              </section>
              </div>
              </div>

              <!-- page end-->
          </section>
      <!--main content end-->
      <!-- Right Slidebar end -->
  </section>

@section footersection
{

    <!--dynamic table-->
    <link href="/assets/advanced-datatable/media/css/demo_page.css" rel="stylesheet"/>
    <link href="/assets/advanced-datatable/media/css/demo_table.css" rel="stylesheet"/>
    <link rel="stylesheet" href="/assets/data-tables/DT_bootstrap.css"/>

    <!-- Custom styles for this template -->
    <link href="/css/style.css" rel="stylesheet">


    <script type="text/javascript" language="javascript" src="/assets/advanced-datatable/media/js/jquery.dataTables.js"></script>
    <script type="text/javascript" src="/assets/data-tables/DT_bootstrap.js"></script>

    <!--dynamic table initialization -->
    <script src="/js/dynamic_table_init.js"></script>


}

 

